extends layout2

block content
	style.
		.table-striped th , td{
			text-align:center;
		}
		.table-striped td .u_state {
			background: #dddddd;
			width: 20px;
			height: 20px;
			display: inline-block;
			border-radius: 20px;
			vertical-align: bottom;
		}
		.table-striped td .u_success{
			background: #54c56d;
		}
		.table-striped td .u_failed{
			background: #d22d25;
		}
		.table-striped td .u_resnone{
			background: #cab658;
		}
	script(src="/socket.io/socket.io.js")
	script.
		
		$(function(){
			
		});

	include header
	.container-fluid
		.row
			include menu
			.col-sm-9.col-sm-offset-3.col-md-10.col-md-offset-2.main
				.row.placeholders					
				h2.sub-header 设备历史
				div
					table.table.table-bordered
						thead
							tr
								th(style="text-align:center;") 网关、节点信息								
								th(style="text-align:center;") 固件上传结果
								th(style="text-align:center;") 固件文件名					
						tbody
							-if(rowData.length > 0 )
								-for(var i in rowData)
									tr
										td #{rowData[i].gateway_info}
										td #{rowData[i].firmware_result}
										td #{rowData[i].firmware_filename}
							-else
								tr
									td(colspan="3") 데이터가 없습니다.					
					div(align="center")
						ul.pagination
							-if(startPage != 1)
								li
									a(href='/device_record?page=#{startPage-1}') Prev							
							-for(var i=startPage; i <= endPage; i++)
								-if(currentPage == i)
									li.active
										a(href="/device_record?page=#{i}")= i
								-else
									li
										a(href="/device_record?page=#{i}")= i
							-if(totalPage != endPage)
								li
									a(href='/device_record?page=#{endPage+1}') Next
					